package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author stylefeng
 * @since 2018-08-24
 */
@TableName("sys_car_info")
public class CarInfo extends Model<CarInfo> {

    private static final long serialVersionUID = 1L;
    public static final String STATUS_NOT_USE ="未使用" ;
    public static final String STATUS_ALREADY_USE = "使用中";
    public static final String STATUS_NORMAL_USE = "常用";
    public static final String STATUS_NORMAL_ORDER = "已预约";
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 车牌号
     */
    @TableField("plate_number")
    private String plateNumber;
    /**
     * 车类型
     */
    private String type;
    /**
     * 车辆状态
     */
    private Integer status;

    /**
     * 车辆描述
     */
    private String description;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPlateNumber() {
        return plateNumber;
    }

    public void setPlateNumber(String plateNumber) {
        this.plateNumber = plateNumber;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getStatus() {
        return status;
    }

    public String getStatusView(){
        String statusView = "";
        if (this.status==0){
               statusView =STATUS_NOT_USE;
        }else if (this.status==1){
            statusView=STATUS_ALREADY_USE;
        }else if (this.status==2){
            statusView=STATUS_NORMAL_USE;
        }else if (this.status==3){
            statusView=STATUS_NORMAL_ORDER;
        }else {
            statusView="状态异常";
        }
        return statusView;
    }



    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CarInfo{" +
        "id=" + id +
        ", plateNumber=" + plateNumber +
        ", type=" + type +
        ", status=" + status +
        ", description=" + description +
        "}";
    }
}
